import httpUtil from "../utils/httpUtil"

const is404 = () => {
	let params = {
		a: httpUtil.getA()
		// a: 666666,
	}
	httpUtil.postReturnSource('/api/Alipayad/status', params, res => {
		// res.code = -404
		if (res.code == -404) {
			uni.redirectTo({
				url: '/pages/404/404'
			})
		}
		// console.log('is404', res, res.code)
	})
}


/**
 * 埋点请求
 */
const buriedPoint = () => {
	let params = {
		a: httpUtil.getA(),
		env: 52, //环境:1=微信小程序,2=h5,3=广州地铁页面
	}

	httpUtil.postReturnSource('/api/rf/getMpUrl', params)
}


export default {
	buriedPoint,
	is404,
}